package org.fat.nred.actd.tenant.controller;


import lombok.extern.slf4j.Slf4j;
import org.fat.nred.actd.tenant.config.DataSourceContextHolder;
import org.fat.nred.actd.tenant.entity.Test;
import org.fat.nred.actd.tenant.entity.User;
import org.fat.nred.actd.tenant.service.TestService;
import org.fat.nred.actd.tenant.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Welisit
 * @since 2020-06-24
 */
@RestController
@RequestMapping("/test")
@Slf4j
public class TestController {

    @Autowired
    private TestService testService;
    @GetMapping("/test1")
    public List<Test> test1(){
        //DataSourceContextHolder.setDBType("test_01");
        return testService.list();
    }
}

